package com.kuang.service;

import com.kuang.dao.BookMapper;
import com.kuang.pojo.Books;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @author:liuwei
 * @creatdate:2022-04-08-18:02
 */
public class BookServiceImpl implements BookService {
	@Autowired
	private BookMapper bookMapper;

	public void setBookMapper(BookMapper bookMapper) { this.bookMapper = bookMapper; }

	@Override
	public int addBook(Books book) { return bookMapper.addBook(book); }

	@Override
	public int deleteBookById(int id) {
		return bookMapper.deleteBookById(id);
	}

	@Override
	public int updateBook(Books books) {
		return bookMapper.updateBook(books);
	}

	@Override
	public Books queryBookById(int id) {
		return bookMapper.queryBookById(id);
	}

	@Override
	public List<Books> queryAllBook() { return bookMapper.queryAllBook(); }
}
